home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / pibt3sp3.arc / PIBUPLOD.PAS < prev    next >
Pascal/Delphi Source File  |  1985-10-04  |  7KB  |  98 lines

  1. (*----------------------------------------------------------------------*)
  2. (*        PIBUPLOAD.PAS --- File Upload Routines for PibTerm            *)
  3. (*----------------------------------------------------------------------*)
  4. (*                                                                      *)
  5. (*  Author:  Philip R. Burns                                            *)
  6. (*           Copyright (c) October, 1985                                *)
  7. (*                                                                      *)
  8. (*  Version: 1.0   (January, 1985)                                      *)
  9. (*           2.0   (June, 1985)                                         *)
  10. (*           3.0   (October, 1985)                                      *)
  11. (*                                                                      *)
  12. (*  Systems: For MS-DOS on IBM PCs and close compatibles only.          *)
  13. (*           Note:  I have checked these on Zenith 151s under           *)
  14. (*                  MSDOS 2.1 and IBM PCs under PCDOS 2.0.              *)
  15. (*                                                                      *)
  16. (*  History: Original with me, but the XMODEM is based upon the         *)
  17. (*           famous (X)MODEM(7) programs of Christiansen, et. al.       *)
  18. (*           Note that both the Checksum and CRC versions of XMODEM     *)
  19. (*           are available here.                                        *)
  20. (*                                                                      *)
  21. (*           Version 2.0 added the MODEM7, TELINK, and YMODEM protocols.*)
  22. (*           Version 3.0 added the Kermit protocol.                     *)
  23. (*           Parts of the Kermit code are based upon a CP/M Turbo       *)
  24. (*           version of Kermit by Jeff Duncan.                          *)
  25. (*                                                                      *)
  26. (*           Suggestions for improvements or corrections are welcome.   *)
  27. (*           Please leave messages on Gene Plantz's BBS (312) 882 4145  *)
  28. (*           or Ron Fox's BBS (312) 940 6496.                           *)
  29. (*                                                                      *)
  30. (*           IF you use this code in your own programs, please be nice  *)
  31. (*           and give proper credit.                                    *)
  32. (*                                                                      *)
  33. (*----------------------------------------------------------------------*)
  34. (*                                                                      *)
  35. (*                            Restriction                               *)
  36. (*                            -----------                               *)
  37. (*                                                                      *)
  38. (*           You may use this code only for NON COMMERCIAL purposes     *)
  39. (*           unless you explicitly obtain my permission.  I take a dim  *)
  40. (*           view of others making money on my work and those of other  *)
  41. (*           people whose code I've inserted here.                      *)
  42. (*                                                                      *)
  43. (*----------------------------------------------------------------------*)
  44. (*                                                                      *)
  45. (*  Routines:                                                           *)
  46. (*                                                                      *)
  47. (*     PibUpLoad  --- Main control routine                              *)
  48. (*                                                                      *)
  49. (*     Send_Ascii_File     --- Send Ascii file to another computer      *)
  50. (*     Send_Xmodem_File    --- Send file with XMODEM                    *)
  51. (*     Send_Modem7_File    --- Send file with MODEM7                    *)
  52. (*     Send_Telink_File    --- Send file with Telink                    *)
  53. (*     Send_Kermit_File    --- Send file with Kermit                    *)
  54. (*                                                                      *)
  55. (*     Get_Upload_Transfer_Protocol --- Determines type of transfer     *)
  56. (*                                                                      *)
  57. (*----------------------------------------------------------------------*)
  58.  
  59. (*----------------------------------------------------------------------*)
  60. (*           PibUpLoad --- Control routine for uploads/downloads        *)
  61. (*----------------------------------------------------------------------*)
  62.  
  63. OVERLAY PROCEDURE PibUpLoad( Transfer_Protocol : Transfer_Type );
  64.  
  65. (*----------------------------------------------------------------------*)
  66. (*                                                                      *)
  67. (*     Procedure:  PibUpload                                            *)
  68. (*                                                                      *)
  69. (*     Purpose:    Controls uploading of files to remote hosts.         *)
  70. (*                                                                      *)
  71. (*     Calling Sequence:                                                *)
  72. (*                                                                      *)
  73. (*        PibUpLoad( Transfer_Protocol : Transfer_Type );               *)
  74. (*                                                                      *)
  75. (*           Transfer_Protocol --- type of transfer to do               *)
  76. (*                                                                      *)
  77. (*     Remarks:                                                         *)
  78. (*                                                                      *)
  79. (*        Currently, the only available protocols are:                  *)
  80. (*                                                                      *)
  81. (*           Ascii file transfer (no error-correction)                  *)
  82. (*           Xmodem with Checksum                                       *)
  83. (*           Xmodem with CRC                                            *)
  84. (*           Modem7                                                     *)
  85. (*           Telink                                                     *)
  86. (*           Kermit                                                     *)
  87. (*                                                                      *)
  88. (*      Calls:   Send_Ascii_File                                        *)
  89. (*               Send_Xmodem_File                                       *)
  90. (*               Send_Modem7_File                                       *)
  91. (*               Send_Kermit_File                                       *)
  92. (*               Send_Telink_File                                       *)
  93. (*                                                                      *)
  94. (*----------------------------------------------------------------------*)
  95.  
  96. VAR
  97.    OK_Init           : BOOLEAN;
  98.    I                 : INTEGER;